﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vux.Chart.Objects
{
    public class DoubleRange
    {
        private double min, max;

        /// <summary>
        /// Minimum value of the range.
        /// </summary>
        /// 
        /// <remarks><para>The property represents minimum value (left side limit) or the range -
        /// [<b>min</b>, max].</para></remarks>
        /// 
        public double Min
        {
            get { return min; }
            set { min = value; }
        }

        /// <summary>
        /// Maximum value of the range.
        /// </summary>
        /// 
        /// <remarks><para>The property represents maximum value (right side limit) or the range -
        /// [min, <b>max</b>].</para></remarks>
        /// 
        public double Max
        {
            get { return max; }
            set { max = value; }
        }

        /// <summary>
        /// Deffirence between maximum and minimum values.
        /// </summary>
        public double Length
        {
            get { return max - min; }
        }


        /// <summary>
        /// Initializes a new instance of the <see cref="DoubleRange"/> class.
        /// </summary>
        /// 
        /// <param name="min">Minimum value of the range.</param>
        /// <param name="max">Maximum value of the range.</param>
        /// 
        public DoubleRange(double min, double max)
        {
            this.min = min;
            this.max = max;
        }
    }

}
